<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{title}}</h1>
        <p>{{message}}</p>
        <span>{{#data.#msg}}</span>
        <div>{{reverseMessage()}}</div>
    </div>

    <script src="../vue/vue.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                title: '这是主标题',
                message: '这是段落中的文本内容',
                $msg: '这是以$开头的属性数据'
            },
            methods: {
                reverseMessage(){
                    return this.message.split(''),reverse().join('')
                }
            }
        })
    </script>
</body>
</html>